require "test/unit"

class MyTest < Test::Unit::TestCase

  # Called before every test method runs. Can be used
  # to set up fixture information.
  def setup
     product = Product.new
      product.id = 1 # We set the ID ourselves here.
      product.description = "basic test, nothing special"
      product.price = 10
      @save = product.save
      assert(@save, "It failed")
  end

  # Called after every test method runs. Can be used to tear
  # down fixture information.

  def teardown
      all_records = Product.find(:all)
      all_records.each { |record| record.destroy }
      all_records = Product.find(:all)
      assert_equal(0, all_records.length)
  end



end